package com.coollang.smartbra.beans;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * @author : Timmy
 * @Data: 2017/6/29
 * @Fuction:
 */
public class ActionData implements Parcelable {

    public int actionType;
    public int errorFlag;
    public String errorType;
    public String errorInfo;
    public int errorVideo;

    public int getActionType() {
        return actionType;
    }

    public void setActionType(int actionType) {
        this.actionType = actionType;
    }


    public String getErrorInfo() {
        return errorInfo;
    }

    public void setErrorInfo(String errorInfo) {
        this.errorInfo = errorInfo;
    }

    public int getErrorFlag() {
        return errorFlag;
    }

    public void setErrorFlag(int errorFlag) {
        this.errorFlag = errorFlag;
    }

    public String getErrorType() {
        return errorType;
    }

    public void setErrorType(String errorType) {
        this.errorType = errorType;
    }

    public int getErrorVideo() {
        return errorVideo;
    }

    public void setErrorVideo(int errorVideo) {
        this.errorVideo = errorVideo;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel parcel, int flags) {
        parcel.writeInt(actionType);
        parcel.writeInt(errorFlag);
        parcel.writeInt(errorVideo);
        parcel.writeString(errorType);
        parcel.writeString(errorInfo);
    }

    /**
     * 必须实现的方法
     */
    public static final Parcelable.Creator<ActionData> CREATOR = new Creator<ActionData>() {
        @Override
        public ActionData createFromParcel(Parcel source) {
            ActionData data = new ActionData();
            data.actionType = source.readInt();
            data.errorFlag = source.readInt();
            data.errorVideo = source.readInt();
            data.errorType = source.readString();
            data.errorInfo = source.readString();
            return data;
        }

        @Override
        public ActionData[] newArray(int size) {
            return new ActionData[size];
        }
    };

}
